package top.infopub.mgr.cap.web;


import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.infopub.mgr.cap.domain.LookInfoDomain;
import top.infopub.mgr.cap.vo.LookInfoBeginVo;
import top.infopub.mgr.common.page.ParamPage;
import top.infopub.mgr.common.vo.RspVo;
import top.infopub.mgr.flow.web.GenericFlowController;
import top.infopub.mgr.mkt.service.MarketManageService;
import top.infopub.model.hr.OrgInfo;
import top.infopub.model.hr.StaffInfo;
import top.infopub.security.util.SessionUserUtils;
import top.infopub.security.vo.AuthorizationVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 融资台账管理
 * @author TSZ
 * @version
 * @see
 * @since
 */
@Controller
@RequestMapping("/financing")
public class FinancingController  extends GenericFlowController {


    @Autowired
    private MarketManageService marketManageService;
    /**
     * 融资台账列表
     * @return
     */
    @RequestMapping("/list")
    public String list() {
        return "cap/lay-financing-list";
    }



    
    /**
     *  融资立项列表
     * @return
     */
    @RequestMapping("/financingList")
    public String bidManageList(HttpServletRequest request) {
        //获取登录人员信息
        AuthorizationVO vo = SessionUserUtils.getSessionAttributeForUserDtl();
        //查询区域公司列表
        List<OrgInfo> orgInfoList = marketManageService.queryOrgInfoByAuthUserId(vo);
        request.setAttribute("orgInfoList", orgInfoList);
        //查询营销人员列表
        List<StaffInfo> staffInfoList = marketManageService.queryStaffInfoByAuthUserId(vo);
        request.setAttribute("staffInfoList", staffInfoList);
        return "cap/lay-financing-list";
    }
}
